<%@page import="java.util.Map"%>
<%@page import="com.alibaba.fastjson.JSON"%>
<%@page import="CustomClassFile.yueli.Jiaban"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util"%>
<%@ page import="com.weaver.formmodel.mobile.manager.MobileUserInit"%>
<%@ page import="weaver.hrm.User"%>
<%
String type=request.getParameter("type");

int userid=Util.getIntValue(request.getParameter("userid"));
Map<String,String[]> map=request.getParameterMap();
Jiaban.logger.info("jiabanAction.jsp接收参数："+JSON.toJSONString(map));
/*在移动端这样获取当前用户*/
User user = MobileUserInit.getUser(request, response);
Jiaban.logger.info(userid);
if(userid==-1){
	userid=	user.getUID();
}
int pageNo = Util.getIntValue(request.getParameter("pageNo"));
int pageSize = Util.getIntValue(request.getParameter("pageSize"));
String applyYear = Util.null2String(request.getParameter("applyYear"));
String year= Util.null2String(request.getParameter("year"));
if("1".equals(type)){
	out.print(JSON.toJSONString(Jiaban.jiabanTotal(userid,year)));
}else{
	out.print(Jiaban.selectRecord(userid, applyYear, pageNo, pageSize));
}

%>